package com.service.auth.serviceauth.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

@RestController
@RequestMapping("/users")
@Slf4j
public class UserController {


    @RequestMapping(value = "/current", method = RequestMethod.GET)
    public Principal getUser(Principal principal){
        System.out.println(">>>>>>>>>>>>>>>>>");
        System.out.println(principal.toString());
        System.out.println(">>>>>>>>>>>>>>>>>");
        log.info("执行了getUser");
        return principal;
    }
}
